﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using Yxinmt.Controls;
using Yxinmt.Interface;
using Yxinmt.Utility;

namespace Yxinmt.Windows.Meeting
{
    public class SecondIndex : BaseWindow, IWindow
    {
        public SecondIndex(System.Windows.Window form,  Dictionary<string, object> parameters)
        {
            Window = form;
            _Parameters = parameters;
            InitSet();

            initView();

            this.SetWindow();

            initLoad();
        }


        void initView()
        {
            SetTheme(_Parameters.GetStringValue("Theme"));
            var label1 = Utility.Common.GetProperty(_View, "Label1");
            label1["Text"] =  addEmptyChar( _Parameters.GetStringValue("Name"));
        }


        IControl _Label { get; set; }

        void initLoad()
        {
            _Label = GetControl("Label1");
        }

        public void SetLabel(string name)
        {
            _Label.SetValue(addEmptyChar(name));
        }

        string addEmptyChar(string name)
        {
            return string.Join(" ", name.ToCharArray());
        }
    }
}
